/* 
 * File:   Mutex.cpp
 * Author: agu
 * 
 * Created on 15 de mayo de 2014, 16:00
 */

#include <stdlib.h>
#include <pthread.h>
#include "common_Mutex.h"

Mutex::Mutex() {
    pthread_mutex_init(&this->mutex, NULL);
}

Mutex::~Mutex() {
    pthread_mutex_destroy(&this->mutex);
}

void Mutex::lock() {
    pthread_mutex_lock(&this->mutex);
}

void Mutex::unlock() {
    pthread_mutex_unlock(&this->mutex);
}
